﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CommonSearch.aspx.cs" Inherits="CocisWeb.Report.CommonSearch" %>

<%--<%@ Register src="../UserControl/NLBModeList.ascx" tagname="NLBModeList" tagprefix="uc2" %>--%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<link href="../css/cont.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<style type="text/css">
.settingsClosed
{
    text-indent:-9999em;
    width:685px;
    height:20px;
    left:100px;
    display:block;
    background:url('../images/toggle_bg.gif') no-repeat 0px 0px;
}
.settingsShown
{
    text-indent:-9999em;
    width:685px;
    height:20px;
    display:block;
    left:100px;
    background:url('../images/toggle_bg.gif') no-repeat 0px -80px;
}
</style>
<script src="../js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script  type="text/javascript">
function checkAdd()
{
    var names = document.getElementById("txtServerName");
    var Ip = document.getElementById("txtServerIP");
    var sn = document.getElementById("txtSN");
    var cn = document.getElementById("txtClusterName");
    var an = document.getElementById("txtAssetNo");
    var un = document.getElementById("txtUniqueNo");
    var keys = names.value + Ip.value + sn.value + cn.value + an.value + un.value;
    if (keys == "") {
        alert('Please input your search keywords ！');
        names.focus();
        return false;
    }
    else 
    {
            return true;
    }
}
</script>
   
</head>
<body style="padding-left:5px;padding-right:5px;background-image:url(../images/bg.gif);	background-repeat:repeat-x;">
 <form id="form1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server">
  </asp:ScriptManager>
  <table style="height:100%; width:100%;" border="0px" cellpadding="0px" cellspacing="0px">
        <tr style="background-image: url(../images/bg_header.gif); background-repeat: repeat-x; height:47px">
        <td style="width:10px;background-image: url(../images/main_hl.gif);"></td>
            <td>
                <span style="float: left; background-image: url(../images/main_hl2.gif); width: 15px; background-repeat: no-repeat; height: 47px"></span>
                <span style="padding-right: 10px; padding-left: 10px; float: left; background-image: url(../images/main_hb.gif); line-height:47px; color: white; background-repeat: repeat-x; height: 47px; text-align: center;">
                    Common Search:</span>
                <span style="float: left; background-image: url(../images/main_hr.gif); width: 60px; background-repeat: no-repeat; height: 47px"></span>
            </td>
            <td style="background-image: url(../images/main_hr2.gif);width:10px"></td>
        </tr>

        <tr>
            <td style="background-image: url(../images/main_ls.gif)"></td>
            <td style="padding-right: 10px; padding-left: 10px; padding-bottom: 10px; color: #566984; padding-top:10px; background-color: white;">
                  

           <fieldset>
     <legend>KeyWords</legend>
                     &nbsp; ServerName：<asp:TextBox ID="txtServerName" runat="server"></asp:TextBox>&nbsp;ServerIP：<asp:TextBox ID="txtServerIP" runat="server"></asp:TextBox>&nbsp;S/N：<asp:TextBox ID="txtSN" runat="server"></asp:TextBox>&nbsp;ClusterName：<asp:TextBox ID="txtClusterName" runat="server"></asp:TextBox><br />
                     &nbsp; AssetNo：<asp:TextBox 
             ID="txtAssetNo" runat="server" Width="166px"></asp:TextBox>&nbsp;UniqueNo：<asp:TextBox 
                         ID="txtUniqueNo" runat="server"></asp:TextBox>&nbsp;FullInstanceName ：<asp:TextBox 
             ID="txtFullInstanceName" runat="server" Width="299px"></asp:TextBox><br />
                 </fieldset>
     
           <asp:UpdatePanel ID="UpdatePanel2" runat="server">
             <ContentTemplate>
     

           
           
           <fieldset >
           <legend>Filter2</legend>
               <asp:Label ID="Label1" runat="server" Text="Environment" Visible="False"></asp:Label>
               <asp:DropDownList ID="ddlEnvironment" runat="server" Visible="False">
                         </asp:DropDownList>
                          Status：<asp:DropDownList ID="ddlStatus" runat="server" 
                   Visible="False">
               </asp:DropDownList>
               &nbsp;Physical_VM：<asp:DropDownList ID="ddlPhysical_VM" runat="server">
                             <asp:ListItem>Physical</asp:ListItem>
                             <asp:ListItem>VMware</asp:ListItem>
                             <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                         </asp:DropDownList>
                         &nbsp; HostingType：<asp:DropDownList ID="ddlHostingType" runat="server">
                             <asp:ListItem>E2E</asp:ListItem>
                             <asp:ListItem>ICAS</asp:ListItem>
                             <asp:ListItem>HostingOnly</asp:ListItem>
                             <asp:ListItem>Hosting+OS</asp:ListItem>
                             <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                         </asp:DropDownList>
                          BU：<asp:DropDownList ID="ddlBU" runat="server">
                             <asp:ListItem>ICAS</asp:ListItem>
                             <asp:ListItem>SAF</asp:ListItem>
                             <asp:ListItem>BTT</asp:ListItem>
                             <asp:ListItem>HR</asp:ListItem>
                             <asp:ListItem>ShareSevice</asp:ListItem>
                             <asp:ListItem>N/A</asp:ListItem>
                             <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                         </asp:DropDownList>
       
    
                    
                         <br />
               <br />
                          DeviceType：<asp:DropDownList ID="ddlDeviceType" runat="server">
                         </asp:DropDownList>
                          ClusterType：<asp:DropDownList ID="ddlClusterType" runat="server">
                             <asp:ListItem>MSCS</asp:ListItem>
                             <asp:ListItem>NLB</asp:ListItem>
                             <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                         </asp:DropDownList>
                         &nbsp;NLBMode ：<asp:DropDownList ID="ddlNLBMode" runat="server">
               </asp:DropDownList>
               &nbsp;DBType：<asp:DropDownList ID="ddlDBType" runat="server">
                         </asp:DropDownList>
                          RecoveryMode：<asp:DropDownList ID="ddlRescoveryModel" runat="server">
                             <asp:ListItem>Full</asp:ListItem>
                             <asp:ListItem>Bulk-logged</asp:ListItem>
                             <asp:ListItem>Simple</asp:ListItem>
                             <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                         </asp:DropDownList>
                          CVBackup：<asp:DropDownList ID="ddlCVCoverage" runat="server">
                         </asp:DropDownList>
                         <br />
                 
                    
                     <br />
                             
     </fieldset>
             </ContentTemplate>
             
             
         </asp:UpdatePanel> 
      
          <fieldset>
     <legend>Filter3</legend>
       
  
      <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <ContentTemplate>
          <table id="tablea"  style="width:1014px;" >
              <tr>
                  <td style="width:50px; text-align:right;" >
                      SiteCode：</td>
                  <td style="width:50px; text-align:right;" >
                      <asp:CheckBox ID="cbxAllSiteCode" runat="server" Text="ALL" 
                AutoPostBack="True" oncheckedchanged="cbxAllSiteCode_CheckedChanged" 
                          Checked="True" />
                  </td>
                  <td style="text-align:left;" >
                      <asp:CheckBoxList ID="cbxlSiteCode" runat="server" RepeatColumns="6" 
                 RepeatDirection="Horizontal" RepeatLayout="Flow">
                      </asp:CheckBoxList>
                  </td>
              </tr>
          </table>
      </ContentTemplate>
  </asp:UpdatePanel>
  &nbsp;&nbsp;&nbsp;&nbsp;
                      <asp:Button ID="btnSearch" runat="server" CssClass="button_normal" 
                          onclick="btnSearch_Click" 
                         
                          Text="Search" />&nbsp;&nbsp;&nbsp;
  <asp:Button ID="btnExcel" runat="server" CssClass="button_normal" 
                          onclick="btnExcel_Click" Text="Export" />
     </fieldset>
        
          <a href="#" id="displaysettingsfieldsetAnchor" style=" text-decoration:none;"  class="settingsClosed">display settings</a> 
              <div id="displaysettingsfieldset" style=" width:100%; display:none">
              <fieldset >
                <legend>Filter1</legend>  
                 AssetType：<asp:DropDownList ID="ddlAssetType" runat="server" 
                    AutoPostBack="True" 
                 onselectedindexchanged="ddlAssetType_SelectedIndexChanged">
                <asp:ListItem Value="1">Server</asp:ListItem>
                <asp:ListItem Value="2">PhysicalServer</asp:ListItem>
                <asp:ListItem Value="4">ClusterServer</asp:ListItem>
                 <asp:ListItem Selected="True" Value="0">select</asp:ListItem>
                </asp:DropDownList> 
             <br />
             <br />
             <asp:CheckBox ID="ChkBoxAllAssetType" runat="server" Text="ALL" 
                 AutoPostBack="True" oncheckedchanged="ChkBoxAllAssetType_CheckedChanged" Checked="false"/>
             <asp:CheckBoxList ID="cblColumn" runat="server" RepeatColumns="11" 
                 RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="True" 
                 onselectedindexchanged="cblColumn_SelectedIndexChanged" 
                 ontextchanged="cblColumn_TextChanged">
             </asp:CheckBoxList> 
           </fieldset> 
           </div>
          <fieldset>
    <legend>Search Result</legend>
    <br />
                     <asp:GridView ID="gvAsset" runat="server"
            Height="30px" PageSize="15" AutoGenerateColumns="False">
            <EmptyDataTemplate>
                <div>
                   Query result is null………………</div>
            </EmptyDataTemplate>
            <HeaderStyle CssClass="datagrid_headrstyle_normal" />
            <PagerSettings FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" 
                Mode="NextPreviousFirstLast" PreviousPageText="上一页" 
                FirstPageImageUrl="~/images/main_54.gif" 
                LastPageImageUrl="~/images/main_60.gif" NextPageImageUrl="~/images/main_58.gif" 
                PreviousPageImageUrl="~/images/main_56.gif" />
                         <Columns>
                             <asp:BoundField DataField="ServerName" HeaderText="ServerName" />
                             <asp:BoundField DataField="ServerIP" HeaderText="ServerIP" />
                             <asp:BoundField DataField="Alias" HeaderText="Alias" />
                             <asp:BoundField DataField="Domain" HeaderText="Domain" />
                             <asp:BoundField DataField="IfCluster" HeaderText="IfCluster" />
                             <asp:BoundField DataField="OSName" HeaderText="OSName" />
                             <asp:BoundField DataField="OSVersion" HeaderText="OSVersion" />
                             <asp:BoundField DataField="OSServicePack" HeaderText="OSServicePack" />
                             <asp:BoundField DataField="Environment" HeaderText="Environment" />
                             <asp:BoundField DataField="Physical_VM" HeaderText="Physical_VM" />
                             <asp:BoundField DataField="Status" HeaderText="Status" />
                             <asp:BoundField DataField="ScomStatus" HeaderText="ScomStatus" />
                             <asp:BoundField DataField="PatchStatus" HeaderText="PatchStatus" />
                             <asp:BoundField DataField="CVCoverage" HeaderText="CVCoverage" />
                             <asp:BoundField DataField="AppCatalog" HeaderText="AppCatalog" />
                             <asp:BoundField DataField="HostingType" HeaderText="HostingType" />
                             <asp:BoundField DataField="AppSupportTeam" 
                                 HeaderText="AppSupportTeam" />
                             <asp:BoundField DataField="BU" HeaderText="BU" />
                             <asp:BoundField DataField="BUdetails" HeaderText="BUdetails" />
                             <asp:BoundField DataField="Comments" HeaderText="Comments" />
                         </Columns>
            <FooterStyle CssClass="datagrid_footerstyle_normal" Height="20px" />
            <RowStyle HorizontalAlign="Center" Height="19px" />
            
        </asp:GridView>
                     <asp:GridView ID="gvAssets" runat="server"
            Height="30px" PageSize="15">
            <EmptyDataTemplate>
                <div>
                   Query result is null………………</div>
            </EmptyDataTemplate>
            <HeaderStyle CssClass="datagrid_headrstyle_normal" />
            <PagerSettings FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" 
                Mode="NextPreviousFirstLast" PreviousPageText="上一页" 
                FirstPageImageUrl="~/images/main_54.gif" 
                LastPageImageUrl="~/images/main_60.gif" NextPageImageUrl="~/images/main_58.gif" 
                PreviousPageImageUrl="~/images/main_56.gif" />
            <FooterStyle CssClass="datagrid_footerstyle_normal" Height="20px" />
            <RowStyle HorizontalAlign="Center" Height="19px" />
            
        </asp:GridView>
                     <br />
                     <br />
    </fieldset>  
    
              
                 
      </td>
       <td style="background-image: url(../images/main_rs.gif)"></td>
  </tr>
  </table>
  <script type="text/javascript">
      $(document).ready(function () {
          $("#displaysettingsfieldsetAnchor").click(function(){          
              if ($(this).hasClass('settingsClosed')) {
                  $(this).removeClass('settingsClosed').addClass('settingsShown').html('close settings');
                  $("#displaysettingsfieldset").show();
              } 
              else{
                  $(this).removeClass('settingsShown').addClass('settingsClosed').html('show settings');
                  $("#displaysettingsfieldset").hide();
              } 
          });
      }); 
  </script>
  
  </form>
  
</body>
</html>
